package io.renren.modules.offer.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * @author haijun.zhang
 * @email haijun917@qq.com
 * @date 2018-08-05 00:43:36
 */
@TableName("tb_offer")
public class OfferEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId
    @JSONField(name = "-")
    private Long id;

    /**
     * 上游对应的渠道id 默认89
     */
    private Integer dspChannelId;

    /**
     * 下游对应的渠道id 展示默认26
     */
    private Integer sspChannelId;

    /**
     * 上游offerid
     */
    @JSONField(name = "id")
    private Integer dspOfferId;

    /**
     * 下游offerid
     */
    private Integer sspOfferId;

    /**
     * 物料名称
     */
    @JSONField(name = "name")
    private String name;

    //TODO 他们传过来的是秒
    /**
     * 投放结束时间
     */
    private Date endDate;

    /**
     * 状态 active
     * The status of the Offer. Allowed values:
     * active 活动的、paused 已停止、pending 待定、deleted 删除
     * pending (default)
     */
    private String status;

    /**
     * 广告分类 比如社交广告，育儿广告等等 Lifestyle,Catalogs,Ad Network 用逗号分隔不同分类 (确定的意思是标签信息)
     */
    private String category;
    /**
     * 否手头可以手动进行投放 默认1
     * Whether this Offer requires manual approval before an Affiliate can run it.Possible Values:
     * 该要约是否需要手动批准之前，附属机构可以运行它。可能的值:
     * 1 Require Approval 需要批准
     * 2 Public 公共
     * 3 Private 个人
     */
    private Integer offerApproval;

    /**
     * 上面参数对应的英文名
     */
    private String offerApprovalMsg;

    /**
     * 追踪url
     * eg:http://tracking.adinall.com/index.php?offer_id=77298&aff_id=89
     */
    private String trackingLink;

    /**
     * 广告结算类型 CPA · CPC · CPS · CPA+CPS
     */
    private String pricingType;

    /**
     * 成交价格
     * 此报价的统一费率/金额。适用于“payout_type”包含统一费率组件的报价。
     * 只有当payout_type是“CPC”、“CPA”或“CPA+CPS”时才适用。
     *
     * Offer's payout type.
     Allowed values:
     CPC · CPA · CPS · CPA+CPS
     Values of "CPC" and "CPA" indicate a flat payout amount, which is specified in the payout field.
     Value of "CPS " indicates payout is a percentage of sale, which is specified in the percent_payout field.
     Value of "CPA+CPS " indicates both a flat payout amount and a percentage of sale payout.

     提供的支付类型。
     允许的值:
     ·CPA·CPS·CPA+CPS
     “CPC”和“CPA”的值表示固定的支付金额，在支付字段中指定。
     “CPS”的值表示支付是销售额的百分比，这在百分比支付字段中指定。
     “CPA+CPS”的价值是指单位支付金额和销售支出的百分比。
     */
    private String payout;

    /**
     * 支付百分比
     * Percentage of sale payout for offer. Applicable only if payout_type is “CPS” or “CPA+CPS”.
     * 出售支付的百分比。只适用于payout_type为“CPS”或“CPA+CPS”。
     */
    private String percentPayout;

    /**
     * The currency of the Offer.USD(default)
     * 发票货币。美元(默认)
     */
    private String currency;

    /**
     * 推广网址
     * URL that often skips any geo-targeting or other re-targeting implemented by the Offer URL. Allows Affiliates to view sample landing page.
     * 经常跳过任何地理定位或其他重新定位的URL。允许子公司查看样本登陆页。
     */
    private String previewUrl;

    /**
     * 转换跟踪方法用于报价
     * The Conversion tracking method to use for the Offer.
     Allowed values:
     1 Image Pixel;
     2 Postback URL;
     3 iFrame Pixel
     Postback URL (default)
     转换跟踪方法用于报价。
     允许的值:
     1图像像素;
     2回发网址;
     3 iFrame像素
     回发URL(默认)
     */
    private String conversionProtoco;

    /**
     * 上面的英文
     */
    private String conversionProtocolMsg;

    /**
     * 提供的链接地址的缩略图
     */
    private String thumbnail;

    /**
     * 具体投放的地区 直接存json就行了 TODO offerGeo
     * "city": [],
     " country": "Greece",
     " country_code": "GR",
     " type": 1,
     " type_msg": "Include-City"
     Country to be targeted.
     Compatible with country name and country code.
     When the country is identified as the exclusion (type=2), the city is not optional.
     国家的目标。
     与国家名称和国家代码兼容。
     当国家被确定为排除(类型=2)时，城市是不可选的。
     City selection in targeted country.
     An identifier included or excluded.
     Type:
     1 include ;
     2 exclude
     */
    private String offerGeo;

    /**
     * 目前为空
     */
    private String offerVbt;

    /**
     * 具体结算的类型 直接存json就行了
     */
    private String offerEvent;

    /**
     *
     */
    private String offerPostback;

    /**
     * 具体投放平台 直接存json
     */
    private String offerPlatform;

    /**
     *
     */
    private String offerCreative;

    /**
     * 预算上限  直接存json
     */
    private String offerCap;

    /**
     *
     */
    private Date createTime;

    /**
     *
     */
    private Date updateTime;

    private int pushFlag;

    private String description;

    private String batchNo;

    private String pushStatus;

    private String midStatus;

    private String bak;

    public String getMidStatus() {
        return midStatus;
    }

    public void setMidStatus(String midStatus) {
        this.midStatus = midStatus;
    }

    public String getBak() {
        return bak;
    }

    public void setBak(String bak) {
        this.bak = bak;
    }

    public String getPushStatus() {
        return pushStatus;
    }

    public void setPushStatus(String pushStatus) {
        this.pushStatus = pushStatus;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * 获取：自增主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置：自增主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取：上游对应的渠道id 默认89
     */
    public Integer getDspChannelId() {
        return dspChannelId;
    }

    /**
     * 设置：上游对应的渠道id 默认89
     */
    public void setDspChannelId(Integer dspChannelId) {
        this.dspChannelId = dspChannelId;
    }

    /**
     * 获取：
     */
    public Integer getSspChannelId() {
        return sspChannelId;
    }

    /**
     * 设置：
     */
    public void setSspChannelId(Integer sspChannelId) {
        this.sspChannelId = sspChannelId;
    }

    /**
     * 获取：上游offerid
     */
    public Integer getDspOfferId() {
        return dspOfferId;
    }

    /**
     * 设置：上游offerid
     */
    public void setDspOfferId(Integer dspOfferId) {
        this.dspOfferId = dspOfferId;
    }

    /**
     * 获取：下游offerid
     */
    public Integer getSspOfferId() {
        return sspOfferId;
    }

    /**
     * 设置：下游offerid
     */
    public void setSspOfferId(Integer sspOfferId) {
        this.sspOfferId = sspOfferId;
    }

    /**
     * 获取：物料名称
     */
    public String getName() {
        return name;
    }

    /**
     * 设置：物料名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取：状态 active
     */
    public String getStatus() {
        return status;
    }

    /**
     * 设置：状态 active
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * 获取：广告类型
     */
    public String getCategory() {
        return category;
    }

    /**
     * 设置：广告类型
     */
    public void setCategory(String category) {
        this.category = category;
    }

    /**
     * 获取：否手头可以手动进行投放 默认1
     */
    public Integer getOfferApproval() {
        return offerApproval;
    }

    /**
     * 设置：否手头可以手动进行投放 默认1
     */
    public void setOfferApproval(Integer offerApproval) {
        this.offerApproval = offerApproval;
    }

    /**
     * 获取：
     */
    public String getOfferApprovalMsg() {
        return offerApprovalMsg;
    }

    /**
     * 设置：
     */
    public void setOfferApprovalMsg(String offerApprovalMsg) {
        this.offerApprovalMsg = offerApprovalMsg;
    }

    /**
     * 获取：追踪url
     */
    public String getTrackingLink() {
        return trackingLink;
    }

    /**
     * 设置：追踪url
     */
    public void setTrackingLink(String trackingLink) {
        this.trackingLink = trackingLink;
    }

    /**
     * 获取：投放结束时间
     */
    public Date getEndDate() {
        return endDate;
    }

    /**
     * 设置：投放结束时间
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /**
     * 获取：广告结算类型CPA · CPC · CPS · CPA+CPS
     */
    public String getPricingType() {
        return pricingType;
    }

    /**
     * 设置：广告结算类型CPA · CPC · CPS · CPA+CPS
     */
    public void setPricingType(String pricingType) {
        this.pricingType = pricingType;
    }

    /**
     * 获取：成交价格
     */
    public String getPayout() {
        return payout;
    }

    /**
     * 设置：成交价格
     */
    public void setPayout(String payout) {
        this.payout = payout;
    }

    /**
     * 获取：支付百分比
     */
    public String getPercentPayout() {
        return percentPayout;
    }

    /**
     * 设置：支付百分比
     */
    public void setPercentPayout(String percentPayout) {
        this.percentPayout = percentPayout;
    }

    /**
     * 获取：
     */
    public String getCurrency() {
        return currency;
    }

    /**
     * 设置：
     */
    public void setCurrency(String currency) {
        this.currency = currency;
    }

    /**
     * 获取：推广网址
     */
    public String getPreviewUrl() {
        return previewUrl;
    }

    /**
     * 设置：推广网址
     */
    public void setPreviewUrl(String previewUrl) {
        this.previewUrl = previewUrl;
    }

    /**
     * 获取：转换跟踪方法用于报价
     */
    public String getConversionProtoco() {
        return conversionProtoco;
    }

    /**
     * 设置：转换跟踪方法用于报价
     */
    public void setConversionProtoco(String conversionProtoco) {
        this.conversionProtoco = conversionProtoco;
    }

    /**
     * 获取：
     */
    public String getConversionProtocolMsg() {
        return conversionProtocolMsg;
    }

    /**
     * 设置：
     */
    public void setConversionProtocolMsg(String conversionProtocolMsg) {
        this.conversionProtocolMsg = conversionProtocolMsg;
    }

    /**
     * 获取：提供的链接地址的缩略图
     */
    public String getThumbnail() {
        return thumbnail;
    }

    /**
     * 设置：提供的链接地址的缩略图
     */
    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    /**
     * 获取：具体投放的地区 直接存json就行了
     */
    public String getOfferGeo() {
        return offerGeo;
    }

    /**
     * 设置：具体投放的地区 直接存json就行了
     */
    public void setOfferGeo(String offerGeo) {
        this.offerGeo = offerGeo;
    }

    /**
     * 获取：
     */
    public String getOfferVbt() {
        return offerVbt;
    }

    /**
     * 设置：
     */
    public void setOfferVbt(String offerVbt) {
        this.offerVbt = offerVbt;
    }

    /**
     * 获取：具体结算的类型 直接存json就行了
     */
    public String getOfferEvent() {
        return offerEvent;
    }

    /**
     * 设置：具体结算的类型 直接存json就行了
     */
    public void setOfferEvent(String offerEvent) {
        this.offerEvent = offerEvent;
    }

    /**
     * 获取：
     */
    public String getOfferPostback() {
        return offerPostback;
    }

    /**
     * 设置：
     */
    public void setOfferPostback(String offerPostback) {
        this.offerPostback = offerPostback;
    }

    /**
     * 获取：具体投放平台 直接存json
     */
    public String getOfferPlatform() {
        return offerPlatform;
    }

    /**
     * 设置：具体投放平台 直接存json
     */
    public void setOfferPlatform(String offerPlatform) {
        this.offerPlatform = offerPlatform;
    }

    /**
     * 获取：
     */
    public String getOfferCreative() {
        return offerCreative;
    }

    /**
     * 设置：
     */
    public void setOfferCreative(String offerCreative) {
        this.offerCreative = offerCreative;
    }

    /**
     * 获取：预算上限  直接存json
     */
    public String getOfferCap() {
        return offerCap;
    }

    /**
     * 设置：预算上限  直接存json
     */
    public void setOfferCap(String offerCap) {
        this.offerCap = offerCap;
    }

    /**
     * 获取：
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置：
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取：
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置：
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public int getPushFlag() {
        return pushFlag;
    }

    public void setPushFlag(int pushFlag) {
        this.pushFlag = pushFlag;
    }

    @Override
    public String toString() {
        return "OfferEntity{" +
                "id=" + id +
                ", dspChannelId=" + dspChannelId +
                ", sspChannelId=" + sspChannelId +
                ", dspOfferId=" + dspOfferId +
                ", sspOfferId=" + sspOfferId +
                ", name='" + name + '\'' +
                ", status='" + status + '\'' +
                ", category='" + category + '\'' +
                ", offerApproval=" + offerApproval +
                ", offerApprovalMsg='" + offerApprovalMsg + '\'' +
                ", trackingLink='" + trackingLink + '\'' +
                ", endDate=" + endDate +
                ", pricingType='" + pricingType + '\'' +
                ", payout='" + payout + '\'' +
                ", percentPayout='" + percentPayout + '\'' +
                ", currency='" + currency + '\'' +
                ", previewUrl='" + previewUrl + '\'' +
                ", conversionProtoco='" + conversionProtoco + '\'' +
                ", conversionProtocolMsg='" + conversionProtocolMsg + '\'' +
                ", thumbnail='" + thumbnail + '\'' +
                ", offerGeo='" + offerGeo + '\'' +
                ", offerVbt='" + offerVbt + '\'' +
                ", offerEvent='" + offerEvent + '\'' +
                ", offerPostback='" + offerPostback + '\'' +
                ", offerPlatform='" + offerPlatform + '\'' +
                ", offerCreative='" + offerCreative + '\'' +
                ", offerCap='" + offerCap + '\'' +
                ", pushFlag='" + pushFlag + '\'' +
                ", createTime=" + createTime +
                ", description=" + description +
                ", batchNo=" + batchNo +
                ", pushStatus=" + pushStatus +
                ", midStatus=" + midStatus +
                ", updateTime=" + updateTime +
                '}';
    }
}
